package com.dc.refactoring._6_处理概括关系._10_FormTemplateMethod.step3;

import com.dc.refactoring._0_入门.Rental;

public class HtmlStatement extends Statement {

    @Override
    public String headerString(Customer customer) {
        return "<h1>" + customer.getName() + "的租赁记录信息为：</h1>";
    }

    @Override
    public String eachRentalString(Rental rental) {
        return "<p>" + rental.getMovie().getTitle() + "\t" + rental.getCharge() + "</p>";
    }

    @Override
    public String footerString(Customer customer) {
        return  "<p>总金额为：" + customer.getTotalCharge() + "</p>"
            + "<p>你获得的积分为：" + customer.getTotalFrequentRenterPoints() + "</p>";
    }

}
